<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			/*var i = 1;
						var sum = 0;
						while(i <= 100) {
							sum = sum + i;
							i++;
						}
						alert(sum);*/
			var sum = 0;
			for(var i = 1; i <= 100; i++) {
				sum = sum + i;
			}
			alert(sum);
		</script>
	</body>

</html>